<template>
   <div class="col-xs-offset-2 col-xs-8">
        <div class="page-header"><h2>Vue Router Demo</h2></div>
        <button @click="back">后退</button>
        <button @click="forward">前进</button>
        <button @click="go">测试go</button>
    </div>
</template>

<script>
export default {
    name: 'stuBanner',
    methods: {
        back () {
            // console.log(this.$router)
            this.$router.back()
        },
        forward () {
            this.$router.forward()
        },
        go () {
            //传入一个数字,负数2后退2步, 正数3前进3步
            this.$router.go()
        },
    }
}
</script>

<style>

</style>